package com.skydroid.demo.utils

import android.content.Context
import android.os.Handler
import android.os.Looper

/**
 * author:CQD

 * e-mail:634897993@qq.com

 * data:  2020/4/22

 * desc:
 *
 * version:
 */
object LibKit {

    private var context: Context? = null

    private var handler: Handler? = null

    fun init(context: Context) {
        LibKit.context = context.applicationContext
    }

    fun getContext(): Context {
        return context!!
    }

    fun getHandler(): Handler? {
        if (handler == null) {
            handler = Handler(Looper.getMainLooper())
        }
        return handler
    }

    fun getStringByRecouse(id: Int): String? {
        return context!!.getString(id)
    }
}
